﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MySql.Data.MySqlClient;

namespace asp_mysql.Administrador
{
    public partial class WebForm1 : System.Web.UI.Page
    {

        conexion conectar = new conexion();

        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!IsPostBack && Session["tipo"].ToString() == "ALUMNO")
            //{
            //    GridView1.DataSource = conectar.cargar("select * from alumno");
            //    GridView1.DataBind();
            //}
            //conectar.abrir();

            string dat = Session["alumnos"].ToString();
            String[] datos = dat.Split(',');
            //que tome el valor en algunos textboxs
            //TextBox1.Text = datos[1];
            //TextBox2.Text = datos[2];

            if (!IsPostBack && datos[0].ToString() == datos[0].ToString())
            {
                GridView1.DataSource = conectar.cargar("select * from alumno");
                GridView1.DataBind();
            }
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}